You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The raw Kubernetes deployer reconstructs a corev1.Service when redeploying a function. On updates, it previously preserved only the existing Service's ResourceVersion.
Because the generated Service does not contain the network configuration allocated by Kubernetes, redeploying an existing function could submit an empty spec.clusterIP and fail with:
Service "<function-name>" is invalid: spec.clusterIP: Invalid value: "": field is immutable
This change preserves the existing Service's ClusterIP, ClusterIPs, IPFamilies, and IPFamilyPolicy before calling Update, while continuing to generate mutable fields such as ports, selectors, labels, and annotations from the function configuration.
New Service creation is unchanged, so Kubernetes continues to allocate and default its network fields.
The KEDA deployer inherits the fix because it delegates workload deployment to the raw Kubernetes deployer.
Regression tests cover IPv4 single-stack, IPv6 single-stack, dual-stack, preservation of generated mutable fields, and the initial Service creation path.
Testing
Tests done and verified locally: unit test suites (make test), linting and repository checks (make check), and test coverage for single-stack IPv4/IPv6 and dual-stack Service network field preservation.
Manual redeployment with func deploy --deployer=raw verified against a Kubernetes cluster, confirming existing Service ClusterIP and network configuration are preserved across updates.
Fork CI passed the repository's precheck, unit, integration, template, Podman, and runtime E2E suites.
/kind bug
Release Note
Fixed raw and KEDA function redeployments failing when updating an existing Kubernetes Service.
Changes
The raw Kubernetes deployer reconstructs a
corev1.Servicewhen redeploying a function. On updates, it previously preserved only the existing Service'sResourceVersion.Because the generated Service does not contain the network configuration allocated by Kubernetes, redeploying an existing function could submit an empty
spec.clusterIPand fail with:This change preserves the existing Service's
ClusterIP,ClusterIPs,IPFamilies, andIPFamilyPolicybefore callingUpdate, while continuing to generate mutable fields such as ports, selectors, labels, and annotations from the function configuration.New Service creation is unchanged, so Kubernetes continues to allocate and default its network fields.
The KEDA deployer inherits the fix because it delegates workload deployment to the raw Kubernetes deployer.
Regression tests cover IPv4 single-stack, IPv6 single-stack, dual-stack, preservation of generated mutable fields, and the initial Service creation path.
Testing
make test), linting and repository checks (make check), and test coverage for single-stack IPv4/IPv6 and dual-stack Service network field preservation.func deploy --deployer=rawverified against a Kubernetes cluster, confirming existing Service ClusterIP and network configuration are preserved across updates./kind bug
Release Note
Docs